package com.tjf.myjetpackdemo;

import android.os.Bundle;
import android.widget.Button;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.tjf.ioc_annotation_lib.InjectTool;
import com.tjf.ioc_annotation_lib.annation.BindView;
import com.tjf.ioc_annotation_lib.annation.ContentView;
import com.tjf.ioc_annotation_lib.annation_common.onClickCommon;
import com.tjf.ioc_annotation_lib.annation_common.onClickLongCommon;

@ContentView(R.layout.activity_main)
public class MainActivity extends AppCompatActivity {

    @BindView(R.id.button1)
    Button button1;
    @BindView(R.id.button2)
    Button button2;
    @BindView(R.id.button3)
    Button button3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        InjectTool.inject(this);
        Toast.makeText(this, "我是=" + button1.getText().toString(), Toast.LENGTH_LONG).show();

    }


    @onClickCommon(R.id.button2)
    public void show() {
        Toast.makeText(this, "我是=" + button2.getText().toString(), Toast.LENGTH_LONG).show();

    }

    @onClickLongCommon({R.id.button3,R.id.button1})
    public boolean showLong() {
        Toast.makeText(this, "我是=", Toast.LENGTH_LONG).show();

        return true;
    }
}